<?php
    require_once( "includes/login_throw.inc.php" );
	require_once( "includes/common.inc.php" );
	
	$engine = new FileDataEngine();

	$list = "";
	$isErr = false;
	try 
	{
		$list .= $engine->showFiles();
	}
	catch ( Exception $e )
	{
		$list .= $e->getMessage();
		$isErr = true;
	}
	
	$vars = array( 
					'Title' => 'Uploaded Files',
					'mode' => ( $isErr ) ? ( "Error" ) : (""),
					'list' => $list,
					'logScript' => checkLog().".php",
					'logMode' => checkLog(),
				 );
				 
	$vars['menu'] = printMenu();
	$vars['content'] = getView('templates/show_uploaded_files.tpl', $vars);
	
	buildLayout('templates/head.tpl', $vars);
?>